package BookStore.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class UDbUtil {
    private static String url = "jdbc:oracle:thin:@localhost:1521:XE";
    private static String userName = "new";
    private static String userPwd = "126875";
    private static Connection con;

    public static Connection getCon() throws Exception {
        con = DriverManager.getConnection(url, userName, userPwd);
        return con;
    }

    public static void closeCon() throws Exception {
        if (con != null) {
            con.close();
        }
    }

}

